import React, { Component } from 'react';
import Progress from 'components/Progressbar/Progressbar'


import { TaskStyled } from './TaskStyled'
import header  from 'images/hall/touxiang2@3x.png'
import dj  from 'images/hall/dj_l1@3x.png'

// class Task extends Component {
//   render() {
function Task(props){
    return (
      <TaskStyled>
        <img onClick={()=>(props.data.hdimg?props.clickHeadImg():console.log('clickBossImg'))}  className="bossImg" src={props.data.hdimg} alt=""/>

        <div className="taskInfoWrap"
        onClick={()=>(props.clickTaskInfo?props.clickTaskInfo():console.log('clickTask'))}>

          <div className="one">
            <p className="nichen">{props.data.degname}</p>
            <p className='price'>赏<span>{Number(props.data.price)}</span>元</p>           
          </div>

          <div className="two">
            {/* <img className="djimg" src={dj} alt=""/> */}
            <Progress
            width='1rem'
            height= '.08rem'
            borderRadius = '.02rem'
            progressWidth={props.data.jd}
            progressColor = '#56D9D1'
            ></Progress>
            <p>{props.data.dj}</p>
          </div>

          <div className="three">
            <p>{props.data.tcontent}</p>
          </div>
        </div>
      </TaskStyled>
    );
  }
// }

export default Task;